package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.sql.Blob;
import java.sql.Clob;
import java.time.LocalDateTime;
import java.util.Date;

@Data
@TableName("t_new")
public class NewBean {
    @TableId(value = "pk_newId",type = IdType.AUTO)
    private Integer id;

    @TableField("n_title")
    private String title;

    @TableField("n_img")
    private String img;

    @TableField("n_author")
    private String author;

    @TableField("n_content")
    private String content;

    @TableField("n_date")
    private Date date = new Date();

    @TableField("n_status")
    private Integer status = 0;

    @TableField("n_sort")
    private Integer sort;
    //评论数
    @TableField(exist = false)
    private Integer Num;

    public NewBean() {
    }

    public NewBean( String title, String author, String content) {
        this.title = title;
        this.author = author;
        this.content = content;
    }

    public NewBean(Integer id, String title, String img, String author, String content, Date date, Integer status, Integer sort, Integer num) {
        this.id = id;
        this.title = title;
        this.img = img;
        this.author = author;
        this.content = content;
        this.date = date;
        this.status = status;
        this.sort = sort;
        Num = num;
    }
}
